package com.efresh.nico.gr_superman;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

/**
 * Created by admin on 2015/12/5.
 */
public class HomeFragment extends Fragment{

    private Button startScan ;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.home_fragment,container,false);
        getActivity().getActionBar().setTitle("扫码");
        startScan = (Button) view.findViewById(R.id.scan_zxing);
        startScan.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), ScanZbra.class);
                startActivity(intent);
            }
        });
        return view;
    }
}
